import java.util.ArrayList;

public class Start {
    public static void main(String args[]){

        String pathTest1 = args[0];
        String pathInside = args[1];
        String pathOutside = args[2];

        ArrayList<Double> modleInside,modelOutside;
        ArrayList<Double> logModelInside,logModelOutside;
        ArrayList<String> test1;

        modleInside = Utils.readTxtFileToDoubleArray(pathInside);
        modelOutside = Utils.readTxtFileToDoubleArray(pathOutside);
        test1 = Utils.readTxtFileToString(pathTest1);


        logModelInside = Utils.log(modleInside);
        logModelOutside = Utils.log(modelOutside);
        int i=1;
        for (String s:test1) {
            double sumProbabilityInside = Utils.dataProbabilitySum(s,logModelInside);
            double sumProbabilityOutside = Utils.dataProbabilitySum(s,logModelOutside);
            double sumInsideOutside = sumProbabilityInside - sumProbabilityOutside;

            System.out.print(i++ +" result is: "+sumInsideOutside+"  ");
            if (sumInsideOutside <=0) System.out.println("Outside");
            if (sumInsideOutside > 0) System.out.println("Inside ");
        }

    }

}
